<template>
	<view class="">
		<view class="img_bg">
			 <image src="/static/wx.png"></image>
		</view>
		<!-- <store-home appid="wx50267d9f8fd8e857"></store-home> -->
		<!-- <view class="" @click="btns">跳转1</view> -->
		<!-- <web-view src="https://store.weixin.qq.com/shop/a/29kBGSNz2N3CB2r"></web-view> -->
		<u-modal v-model="show" title="点击打开微信小店" :show-confirm-button="false" show-cancel-button @cancel="cancel">
			<view class="slot-content">
				<view class="conet"><store-home appid="wx8e84846775294ad4"></store-home></view>
			</view>
		</u-modal>
		<u-tabbar 
		 :list="tab_list" 
		 :mid-button="true" :mid-button-size="50"
		 class="box" active-color="#23AC38" 
		 :border-top="false">
		</u-tabbar>
	</view>
</template>
<script>
	import {
		mapGetters,
		mapState
	} from 'vuex';
	export default {
		data() {
			return {
               show:true
			}
		},
		computed:{
			...mapState({
			   tab_list: state => state.page.tab_list,
			}),
		},
		onLoad() {
			console.log('1111')
			wx.openStoreOrderDetail({
				orderId:"wx50267d9f8fd8e857",
				success:res=>{
					console.log(res)
				},
				complete:res=>{
					console.log(res)
				}
			})
		},
		onShow() {
			this.show  = true
		},
		methods:{
			btns(){
				window.location.href  = '#微信小店://艺礼手工集/yOdaa0DSPcqnQDm'
				return
				wx.navigateToMiniProgram({
				  appId: "wx50267d9f8fd8e857",
				  path: "__plugin__/wx34345ae5855f892d/pages/index/index?productId=136474",
				  envVersion: "trial"
				});
			},
			cancel(){
				this.show = false
				uni.switchTab({
					url:'/pages/home/index'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.conet{
		width: 80%;
		margin: 30rpx auto;
	}
	.img_bg{
		position: absolute;
		width: 100%;
		height: 100vh;
		image{
			width: 100%;
			height: 100%;
		}
	}
</style>